import {getChatter} from "./cloudUtil"
import { uniGetStorageSync } from '@/util/funcs';
import { CHATTER_TO } from '@/util/rongCloud/messaging';

// 融云消息结构
export let chatDataStructure = {
  canIncludeExpansion: false,
  content: {content: "快测初始化消息"},
  disableNotification: false,
  expansion: null,
  isCounted: true,
  isMentiond: false,
  isMentioned: false,
  isOffLineMessage: true,
  isPersited: true,
  messageDirection: 1,
  messageType: "RC:TxtMsg",
  messageUId: "BMBA-GOU4-LFQ4-I2UN",
  receivedStatus: 1,
  receivedTime: (new Date()).getTime(),
  senderUserId: "6",
  sentTime: (new Date()).getTime(),
  targetId:  uniGetStorageSync(CHATTER_TO).rongcloud_id,
  type: 1,
}

export let conversation = {
  hasMentiond: false,
  hasMentioned: false,
  isTop: false,
  lastUnreadTime: 1608033558400,
  latestMessage: {
    type: 1,
    targetId: "merchant_10000",
    senderUserId: "merchant_10000",
    messageType: "RC:TxtMsg",
    messageUId: "BMCP-2DV0-5764-01H2",
    content:{content: 'some conent'},
  },
  mentiondInfo: null,
  mentionedInfo: null,
  notificationStatus: 2,
  targetId: "merchant_10000",
  type: 1,
  unreadMessageCount: 36,
  // 自定义增加
  chatterInfo: {
    // 用户信息
    "code": 200,
    "createTime": "2020-12-07 17:32:48",
    "name": "2",
    "portrait": "http://qz.com/upload/headimg/2020-11-24/5fbc6a1983863.jpg",
    // 招商人员
    "code ": 400,
    "userName": "",
    "userPortrait": "",
    "createTime ": ""
  }
}

let chatMessageStructure = {
  "type": 1,
    "targetId": "6",
    "senderUserId": "6",
    "messageType": "RC:TxtMsg",
    "messageUId": "BMQL-Q96T-C2A6-LGKP",
    "isPersited": true,
    "isCounted": true,
    "isMentiond": false,
    "isMentioned": false,
    "sentTime": 1609898955637,
    "isOffLineMessage": false,
    "messageDirection": 2,
    "receivedTime": 1609898955664,
    "disableNotification": false,
    "receivedStatus": 1,
    "canIncludeExpansion": false,
    "content": {
  "content": "test 10:9:14"
},
  "expansion": null
}

